<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    *{
        padding: 0;
        margin: 0;
    }
    .father{
        position: relative;
        width: 200px;
        height: 200px;
        border: 2px solid #000;
        margin: 200px auto;
        transition: 2s;
        perspective: 1000px;
        transform-style: preserve-3d;
      
    }
    .son1{
        position: absolute;
        top: 0;
        left: 0;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: red;
        z-index: 1;
    }
    .son2{
        top: 0;
        left: 0;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: palegreen;
        transform:rotateY(180deg) ;
      

    }
    .father:hover{
        transform: rotateX(360deg);
    }
</style>
<body>
   <div class="father">
       <div class="son1"></div>
       <div class="son2"></div>
   </div>
</body>
</html>